#!/bin/bash

build_version="5.0.1"
centos_version="7"

while getopts "v:n:" optname
do
    case "$optname" in
    "v")
        centos_version="$OPTARG"
        echo "centos Version $OPTARG"
        ;;
    "n")
        build_version="$OPTARG"
        echo "build version $OPTARG"
        ;;
    *)
        # Should not occur
        echo "Unknown error while processing options"
        ;;
    esac
    echo "OPTIND is now $OPTIND"
done

./Build -v ${centos_version} -n ${build_version}
./postbuild -v ${centos_version} -n ${build_version}

